Skip to content

Conversation

sethdusek
Copy link

This isn't used except by ancient drivers and by Xwayland as a fallback. With Xwayland this causes an issue with implicit modifiers, where Xwayland first tries to import the buffer using the dma-buf interface, then falls back to wl_drm (if it exists), which causes the compositor to crash since none of the requests are implemented in magic-mirror.

Despite magic-mirror not supporting implicit modifiers (potential TODO maybe?), just deleting wl_drm causes Xwayland to somehow do the right thing. Based on my testing, Xwayland first tries importing a buffer with implicit modifiers, and when that fails it creates another buffer with what seems to be an arbitrary modifier advertised by the server which works. Previously it would instead fallback to wl_drm

This fixes the compositor crashing on my niche set-up: magic-mirror running on an integrated GPU with applications running on my dedicated GPU which doesn't support modifiers (which is why magic-mirror can't run on it).

This isn't used except by ancient drivers and by Xwayland as a fallback; but Xwayland using it can be problematic in some cases like when importing a buffer with implicit modifiers since magic-mirror doesn't actually implement WlDrm
@colinmarc
Copy link
Owner

I think I'd like to maintain support for old xwayland for as long as is reasonable, so I'm going to hang on to this for now. Per discord, the failure here seems fairly specific to cross-gpu stuff with implicit modifiers.

@sethdusek
Copy link
Author

I think I'd like to maintain support for old xwayland for as long as is reasonable, so I'm going to hang on to this for now. Per discord, the failure here seems fairly specific to cross-gpu stuff with implicit modifiers.

Seems reasonable. There may be another way in the future to properly support wl_drm/implicit modifiers: github.com/KhronosGroup/Vulkan-Docs/pull/2505. Currently this is only supported by NVK https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33932

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants